#include "calclayoutcode.h"
#include "ui_calclayoutcode.h"

#include <QPushButton>
#include <QHBoxLayout>

calclayoutcode::calclayoutcode(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::calclayoutcode)
{
    ui->setupUi(this);

    //创建水平布局管理器-- 堆空间
    hbox = new QHBoxLayout(ui->centralWidget);

    bt=new QPushButton();
    //把bt放在hbox中
    hbox->addWidget(bt);
}

calclayoutcode::~calclayoutcode()
{
    delete ui;
}
